#define _CRT_SECURE_NO_WARNINGS
#pragma warning(disable:6031)

#include <stdio.h>

int main()
{
	FILE* pf1 = fopen("test1.txt", "w");

	int arr[10] = { 1,2,3,4,5,6,7,8,9,10 };
	fwrite(arr, sizeof(int), 10, pf1);
	char str1[6] = "hello";
	fwrite(str1, sizeof(char), 6, pf1);

	FILE* pf2 = fopen("test2.txt", "r");

	char str2[100] = { 0 };
	int a = 0; 
	fread(&a, sizeof(int), 1, pf2);
	printf("%x", a);

	fclose(pf1);
	pf1 = NULL;

	fclose(pf2);
	pf2 = NULL;

	return 0;
}